Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Net] peers.dat, banlist.dat recreated when missing #7458

Merged
merged 1 commit into from Feb 4, 2016
Merged

[Net] peers.dat, banlist.dat recreated when missing #7458

merged 1 commit into from Feb 4, 2016

Conversation

kirkalx
Copy link
Contributor

@kirkalx kirkalx commented Feb 2, 2016

In response to issue #7452. Still leaves an error message for the missing file in the logs though.

My first PR, so be nice please :)

@kirkalx kirkalx changed the title peers.dat, banlist.dat recreated when missing [Net] peers.dat, banlist.dat recreated when missing Feb 2, 2016
@kirkalx
Copy link
Contributor Author

kirkalx commented Feb 2, 2016

Sorry if I've messed this up with the 2nd commit, jumped the gun a little...

@laanwj laanwj added the P2P label Feb 2, 2016
@laanwj
Copy link
Member

laanwj commented Feb 2, 2016

Welcome @kirkalx

The number of commits doesn't matter; better too many than too few, you can always use git rebase -i and force-push to squash commits together, if that results in clearer or more atomic changes. Separating them out is a bit more tricky.

Looks good to me. utACK.

@kirkalx
Copy link
Contributor Author

kirkalx commented Feb 2, 2016

Thanks Wladimir. I'll stop making changes now as I obviously need to learn a bit about GitHub.

@laanwj
Copy link
Member

laanwj commented Feb 3, 2016

Tested ACK
Without the patch: no banlist.dat written
With patch:

$ mkdir /store2/tmp/testbtc4
$ src/bitcoind -datadir=/store2/tmp/testbtc4 -printtoconsole -disablewallet
2016-02-03 12:48:10 ERROR: Read: Failed to open file /store2/tmp/testbtc4/peers.dat
2016-02-03 12:48:10 Invalid or missing peers.dat; recreating
2016-02-03 12:48:11 init message: Loading banlist...
2016-02-03 12:48:11 ERROR: Read: Failed to open file /store2/tmp/testbtc4/banlist.dat
2016-02-03 12:48:11 Invalid or missing banlist.dat; recreating
^C
$ ls  /store2/tmp/testbtc4
banlist.dat  blocks  chainstate  debug.log  fee_estimates.dat  onion_private_key  peers.dat
$ src/bitcoind -datadir=/store2/tmp/testbtc4 -printtoconsole -disablewallet                                                           
2016-02-03 12:50:10 init message: Loading addresses...
2016-02-03 12:50:10 Loaded 141 addresses from peers.dat  1ms
2016-02-03 12:50:10 init message: Loading banlist...

Before merging, can you please squash these changes into one commit? e.g.

$ git rebase -i 196ad69

In the editor, replace the bottom three 'pick' with 'f', then save and exit.
Then, force-push the result to this branch with

git push -f origin master

@kirkalx
Copy link
Contributor Author

kirkalx commented Feb 3, 2016

Thanks for the help with that Wladimir, seems to have worked. I'll try to come back next week and get rid of the error messages in the logs as well.

@laanwj laanwj merged commit c77c662 into bitcoin:master Feb 4, 2016
laanwj added a commit that referenced this pull request Feb 4, 2016
c77c662 peers.dat, banlist.dat recreated when missing (kirkalx)
luke-jr pushed a commit to luke-jr/bitcoin that referenced this pull request Feb 12, 2016
@laanwj laanwj added this to the 0.12.2 milestone Sep 26, 2016
zkbot added a commit to zcash/zcash that referenced this pull request Mar 6, 2020
banlist.dat: store banlist on disk

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6310
- bitcoin/bitcoin#6315
  - Only the new signal and net changes, no QT
- bitcoin/bitcoin#7350
- bitcoin/bitcoin#7458

Part of #2074.
zkbot added a commit to zcash/zcash that referenced this pull request Nov 12, 2020
banlist.dat: store banlist on disk

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6310
- bitcoin/bitcoin#6315
  - Only the new signal and net changes, no QT.
- bitcoin/bitcoin#7350
- bitcoin/bitcoin#7458
- bitcoin/bitcoin#7696
- bitcoin/bitcoin#7959
- bitcoin/bitcoin#7906
  - Only the ban-related commits.
- bitcoin/bitcoin#8392
  - Only the second commit.
- bitcoin/bitcoin#8085
  - Only the second commit.
- bitcoin/bitcoin#10564

Part of #2074.
zkbot added a commit to zcash/zcash that referenced this pull request Feb 11, 2021
banlist.dat: store banlist on disk

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6310
- bitcoin/bitcoin#6315
  - Only the new signal and net changes, no QT.
- bitcoin/bitcoin#7350
- bitcoin/bitcoin#7458
- bitcoin/bitcoin#7696
- bitcoin/bitcoin#7959
- bitcoin/bitcoin#7906
  - Only the ban-related commits.
- bitcoin/bitcoin#8392
  - Only the second commit.
- bitcoin/bitcoin#8085
  - Only the second commit.
- bitcoin/bitcoin#10564

Part of #2074.
zkbot added a commit to zcash/zcash that referenced this pull request Feb 17, 2021
banlist.dat: store banlist on disk

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6310
- bitcoin/bitcoin#6315
  - Only the new signal and net changes, no QT.
- bitcoin/bitcoin#7350
- bitcoin/bitcoin#7458
- bitcoin/bitcoin#7696
- bitcoin/bitcoin#7959
- bitcoin/bitcoin#7906
  - Only the ban-related commits.
- bitcoin/bitcoin#8392
  - Only the second commit.
- bitcoin/bitcoin#8085
  - Only the second commit.
- bitcoin/bitcoin#10564
- bitcoin/bitcoin#13061
  - Wasn't needed when I first made this backport in 2017, but it is now!

Part of #2074.
zkbot added a commit to zcash/zcash that referenced this pull request Feb 17, 2021
banlist.dat: store banlist on disk

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6310
- bitcoin/bitcoin#6315
  - Only the new signal and net changes, no QT.
- bitcoin/bitcoin#7350
- bitcoin/bitcoin#7458
- bitcoin/bitcoin#7696
- bitcoin/bitcoin#7959
- bitcoin/bitcoin#7906
  - Only the ban-related commits.
- bitcoin/bitcoin#8392
  - Only the second commit.
- bitcoin/bitcoin#8085
  - Only the second commit.
- bitcoin/bitcoin#10564
- bitcoin/bitcoin#13061
  - Wasn't needed when I first made this backport in 2017, but it is now!

Part of #2074.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants